package Entity;


import org.joda.time.DateTime;

import java.sql.Blob;
import java.sql.Timestamp;

/**
 * Created by futao on 2017/9/24.
 */
public class Student {
    //JavaBean(持久化类)编写规范
    //1.公有的类
    //2.私有属性
    //3.提供公有的不带参数的默认构造方法
    //4.私有属性的公有getter和setter
    //5.为方便实例化对象，一般生成一个带参的构造方法

    //设置public static final String的意义在于：比如 .add(Restrictions.eq())的时候，可以直接通过实体的类型点出来，而不用手动输入，这样避免了手动输入发生错误的情况
    private int sid;
    public static final String _sid = "sid";
    private String name;
    public static final String _name = "name";
    private String gender;
    public static final String _gender = "gender";
    private Timestamp birthday;
    public static final String _birthday = "birthday";
//    private String address;
    public static final String _address = "address";
    private String tel;
    public static final String _tel = "tel";

    private Blob picture;//照片,长文本
    public static final String _picture = "picture";

    private Address addressEntity;
    public static final String _addressEntity="addressEntity";

    public Student() {
    }

    public Student(int sid, String name, String gender, Timestamp birthday, String address, String tel, Blob picture) {
        this.sid = sid;
        this.name = name;
        this.gender = gender;
        this.birthday = birthday;
//        this.address = address;
        this.tel = tel;
        this.picture = picture;
    }

    public Blob getPicture() {
        return picture;
    }

    public void setPicture(Blob picture) {
        this.picture = picture;
    }

    public int getSid() {
        return sid;
    }

    public void setSid(int sid) {
        this.sid = sid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public Timestamp getBirthday() {
        return birthday;
    }

    public Address getAddressEntity() {
        return addressEntity;
    }

    public void setAddressEntity(Address addressEntity) {
        this.addressEntity = addressEntity;
    }

    public void setBirthday(Timestamp birthday) {
        this.birthday = birthday;
    }

//    public String getAddress() {
//        return address;
//    }
//
//    public void setAddress(String address) {
//        this.address = address;
//    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }
}
